package jee.boot.module.config;


import jee.boot.entity.mail.Mail;
import jee.boot.module.mail.interceptor.MailInterceptor;
import jee.boot.module.mail.service.SysMailService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 默认的邮件发送后置处理
 *
 * @author zhilei.wang
 */
@Component
public class PrintMailPostInterceptor implements MailInterceptor {
    private Log log = LogFactory.getLog(PrintMailPostInterceptor.class);
    @Autowired
    private SysMailService service;

    @Override
    public void process(Mail mail) throws Exception {
        // 邮件发送后,本地保存记录
        System.out.println("only print mail:"+mail);
    }
}
